package com.ant.storage.mapper;

import com.ant.storage.pojo.Allocation;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
@Mapper
public interface AllocationMapper extends BaseMapper<Allocation> {
    //调拨申请单中间表插入
    void addAllocationAndCommodity(Integer allocation_id, Integer commodityId, Integer commodity_quantity) ;
    //钉钉token查询 token保存时间为7200秒
    String queryToken();
    //添加token
    Integer addToken(String access_token);
    //调拨申请单中间表删除
    void removeAllocationAndCommodity(Integer allocation_warehouse_out_id);
    //根据调拨申请单ID  查询详细信息
    Allocation queryAllocationMessage(Integer allocation_warehouse_out_id);
    //查询
    List<Allocation> queryAllocation(Integer newPage, Integer newLimit, @Param(value = "map") Map map);
    //统计
    Integer countAllocation(@Param(value = "map") Map map);
}
